package com.ty.user.starter.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.ty.user.starter.enums.MenuEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author minku
 * @since 2021-10-16
 */
@Getter
@Setter
@TableName("ty_menu")
@ApiModel(value = "Menu对象", description = "菜单表")
public class Menu implements Serializable {

    private static final long serialVersionUID = 4934175676425971308L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("父id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty("菜单名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("链接")
    @TableField("url")
    private String url;

    @ApiModelProperty("图标")
    @TableField("icon")
    private String icon;

    @ApiModelProperty("排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("状态")
    @TableField("state")
    private Boolean state;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("创建用户Id")
    @TableField("create_user_id")
    private Long createUserId;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("修改用户Id")
    @TableField(value = "update_user_id")
    private Long updateUserId;

    @ApiModelProperty("菜单类型(0:菜单;1:按钮)")
    @TableField("menu_type")
    private MenuEnum menuType;

    @ApiModelProperty(value = "权限值")
    @TableField("perm")
    private String perm;

}
